[//

    async function( kuo,Context,context){
        let LANG = this.LANG();
        let $DATA = Object.assign({},this.$DATA);
        let $hash = 'safetoken/'+kuo.adminid;
        $DATA.token = Mode("Tools").Uuid();
        await  Mem.Set($hash,$DATA.token);
        let  $kongzhi = kuo.Path.length > 0?kuo.Path[kuo.Path.length-1]:"get";
        let  $db = await db('login_weixin');
        let  $_GET = kuo.get;
        let  $_POST = kuo.post;
        let  $chushi = true; 
        let  $features = await Kuoplus(kuo.class);
        if($kongzhi == 'get'){
    
            let $page = Mode("Tools").Int($_GET['page']?$_GET['page']:1);
            let $limitx  =  Mode("Tools").Int($_GET['limit']?$_GET['limit']:10);
            if($limitx < 10 ){
                $limitx = 10;
            }else if($limitx > 100 ){
                $limitx = 100;
            }
            let $where ={};

            if(isset($_GET['uid']) && $_GET['uid'] != ""){
                $chushi = false; 
                $where['uid'] = $_GET['uid'];
            }
            
            if(isset($_GET['unionid']) && $_GET['unionid'] != ""){
                $chushi = false; 
                $where['unionid'] = $_GET['unionid'];
            }
            if(isset($_GET['openid']) && $_GET['openid'] != ""){
                $chushi = false; 
                $where['openid'] = $_GET['openid'];
            }
        
            if(isset($_GET['openidx']) && $_GET['openidx'] != ""){
                $chushi = false; 
                $where['openidx'] = $_GET['openidx'];
            }
        
            if(isset($_GET['openidg']) && $_GET['openidg'] != ""){
                $chushi = false; 
                $where['openidg'] = $_GET['openidg'];
            }
        
            if(isset($_GET['openido']) && $_GET['openido'] != ""){
                $chushi = false; 
                $where['openido'] = $_GET['openido'];
            }

            let $data  = await $db.Where($where).Limit($limitx,$page).Order("id desc").Select();
            let $total = await $db.Where($where).Total();
            if(!$data){
                $data= [];
            }
            $DATA.code = 0;
            $DATA.count = $total;
            if($page == 1 && $chushi){
              
            }
    
            $DATA.data = $data;
    
    
        }else if($kongzhi == 'put'){
            let $id = Mode("Tools").Int($_POST['id']?$_POST['id']:0);
            let $data = await $db.Where({id: $id}).Find();
            if(!$data){
                $DATA.code = -1;
                $DATA.msg = LANG.admin_id_no;
                Context.body = JSON.stringify($DATA);
                return ;
            }

            if(isset( $_POST['weixin'])){
                delete( $_POST['weixin'] );
            }
            
            let $POST = {};
            if( isset($_POST['uid']) && $data['uid'] != $_POST['uid']){
                $POST['uid'] = $_POST['uid'];
            }
        
            if( isset($_POST['off']) && $data['off'] != $_POST['off']){
                $POST['off'] = $_POST['off'];
            }
            let $fan = await $db.Where({id: $id}).Update($POST);
            if($fan){
                await Kuolog('adminlog',kuo.adminid,3,{'yuan':$data,'data':$POST},kuo.func_,kuo.class,kuo.ip);
                $DATA.data = $POST;
                $DATA.code =1;
                $DATA.msg = LANG.put_ok;
            }else{
                $DATA.code =-1;
                $DATA.msg = LANG.put_no;
            }
    
        }else if($kongzhi == 'add'){
            
        }else if($kongzhi == 'del'){
    
        }
        
        Context.body = JSON.stringify($DATA);
    }
    
]